From Classes to Objects via Subtyping
نویسنده
چکیده
We extend the Abadi-Cardelli calculus of primitive objects with object extension. We enrich object types with a more precise, uniform, and exible type structure. This enables to type object extension under both width and depth subtyping. Objects may also have extend-only or virtual contra-variant methods and read-only co-variant methods. The resulting subtyping relation is richer, and types of objects can be weaken progressively from a class level to a more traditional object level along the subtype relationship.
منابع مشابه
Subtyping patterns for active objects
Subtyping relations for object-oriented formalisms describe relationships between superand subclasses which satisfy the substitutability requirement imposed on types and their subtypes. For active objects with an associated behaviour description subtyping relations also have to guarantee substitutability with respect to the dynamic behaviour of classes. In this paper, we give subtyping patterns...
متن کاملMixin and Class Subtyping Hierarchies in a Mobile Setting?
In sequential classand mixin-based settings, subtyping is essentially a relation on objects: no subtype relation is defined on classes and mixins, because otherwise there would be conflicts with the inheritance mechanism. Our goals are: (i) to show the usefulness of a subtyping relation extended to classes and mixins in the realm of mobile and distributed processess, where object-oriented code ...
متن کاملMultiple Inheritance and Type System Design
It is now widely accepted that inheritance is not subtyping [5], and that ‘‘inheritance is a relationship between implementations, while conformity is a relationship between interfaces’’ [1]. But like most maxims, these two are something of an oversimplification. Inheritance: Mechanism or Relation? As realized in Simula and Smalltalk, inheritance is a mechanism for generating new pieces of prog...
متن کاملChecking Behavioural Subtypes via Refinement
Behavioural subtyping is concerned with the question of whether one class is behaviourally consistent with another class. The word “behaviour” in this context usually refers to the semantics of methods, typically given by preand postconditions. In this paper, we will use this term in a more specific way, referring to the dynamic behaviour of objects in time. Behaviour descriptions of classes gi...
متن کاملSafe and Flexible Objects with Subtyping
We design a calculus where objects are created by instantiating classes, as well as mixins. Mixin-instantiated objects are “incomplete objects”, that can be completed in an object-based fashion. The combination of class-based features with object-based ones offers some flexible programming solutions. The fact that all objects are created from fully-typed constructs is a guarantee of controlled ...
متن کامل